package io;

import java.io.File;
import java.io.IOException;

public class Demo01 {
    public static void main(String[] args) throws IOException {
//        File file = new File("d:/test.txt");
        File file = new File("./test.txt");
        System.out.println(file.getParent());
        System.out.println(file.getName());
        System.out.println(file.getPath()); // 创建时候的路径
        System.out.println(file.getAbsolutePath()); // 绝对路径 直接拼接
        System.out.println(file.getCanonicalPath()); // 绝对路径 会处理./
    }
}
